$str = "0791280266601-5011";
Print_r (Explode ("-", $str));
Display effect: Array ([0] = 0791280266601 [1] = 5011);
=========================================
First, how do I get the "0"?
How do you get the second "1"? Now it's torn apart, but I don't know how to get it.
Prawn for advice
Reply to discussion (solution)
$t = Explode ("-", $str);
echo $t [0];
echo $t [1];
$t = Explode ("-", $str);
echo $t [0];
echo $t [1];
------------------------------
You're just going to get rid of the bars, and I want to go to the front of the bar and the numbers behind it.
The effect of your output: 07912802666015011 is wrong.
The effect I want is: 0791280266601
Back to: 5011
Moderator Adult's reply can not achieve what you want, there is a problem of Satan?
Moderator Adult's reply can not achieve what you want, there is a problem of Satan?
--------------------------------------
What I do now is:
$str = "0791280266601-5011";
Print_r (Explode ("-", $str));
Display effect: Array ([0] = 0791280266601 [1] = 5011);
I just want to get an array ([0] = 0791280266601 [1] = 5011); the [0] value inside
$str = "0791280266601-5011";
$t = Explode ("-", $str);
echo $t [0]. "
";
echo $t [1];
Output
0791280266601
5011
$str = "0791280266601-5011";
$t = Explode ("-", $str);
echo $t [0]. "
";
echo $t [1];
Output
0791280266601
5011
Thank you, I am more stupid thank you.