小编Jas*_*uni的帖子

如何拆分PHP变量

我正在寻找一种方法将字符串变量拆分为两个.举个例子,如果我有:

$activities = "In the morning we will dance, in the evening we will sing"
Run Code Online (Sandbox Code Playgroud)

我想把它拆分成,

$activities1 = "In the morning we will dance"
$activities2 = "In the evening we will sing"
Run Code Online (Sandbox Code Playgroud)

我将不胜感激任何帮助.

谢谢

php

-2
推荐指数
1
解决办法
2194
查看次数

标签 统计

php ×1