PHP检查字符串包含#(任意)

时间:2015-06-21 06:52:39

标签: php jquery

在这里回答How do I extract words starting with a hash tag (#) from a string into an array

我使用php代码获取包含hash的任何值"#" 例如输入

$var = "Hello, now i am in #hotel_indonesia #today";

我想选择字符串" hotel_indonesia"和"今天"自动在php输出 我需要使用什么语法?

我想要这样的输出,因为我想将它保存到数据库中

$var = array('hotel_indonesia','today');

0 个答案:

没有答案
相关问题