PHP function split & nbsp; $ str & nbsp; 0791280266601-5011; & nbsp; print_r & nbsp; (explode (-, $ str); & nbsp; display effect: Array & nbsp; (& nbsp; [0] & nbsp; & gt; & nbsp; 0791280266601 & nbsp; [1] & nbsp; & gt; & nbsp PHP function split
$ Str = "0791280266601-5011 ";
Print_r (explode ("-", $ str ));
Display effect: Array ([0] => 0791280266601 [1] => 5011 );
========================================================== =
First, how do I get the "0?
2 [1] how to get it? It's split now, but I don't know how to get it?
Prawn for advice
Share: More
------ Solution --------------------
$ T = explode ("-", $ str );
Echo $ t [0];
Echo $ t [1];
------ Solution --------------------
Can an adult reply to the moderator meet what you want?
------ Solution --------------------
$ Str = "0791280266601-5011 ";
$ T = explode ("-", $ str );
Echo $ t [0]."
";
Echo $ t [1];
Output
0791280266601
5011