How do i explode this string '||25||34||73||94||116||128' i
need to have a array like this
0 => '25',
1 => '34',
2 => '73',
3 => '94',
4 => '116',
5 => '128'
explode("||", $array); didnt work for me i get this array
0 => '',
1 => '25',
2 => '34',
3 => '73',
4 => '94',
5 => '116',
6 => '128',
Answers were Sorted based on User's Feedback
Answer / rekha_sri
Use the following program.It will remove the beginning ||.
$array = explode('||', trim($string, '|'));
|Is This Answer Correct ?||23 Yes||0 No|
Answer / nilsoft
$string = '||25||34||73||94||116||128';
|Is This Answer Correct ?||2 Yes||0 No|
Hi all,, im completely new to PHP, started learning just 2 days before. Can anybody tell me how to run a PHP file to see the program's output? i have created some simple program in Dreamweaver CS3 but don't know how to run it...
What is a model in php?
Can I use node js with php?
Require_once(), require(), include(). What is difference between them?
What is a procedure in php?
What is the best practice for running mysql queries in php? Consider the risk of sql injection.
Explain Whitespace Characters?
What is Mcrypt used for?
What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?
Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
Steps for the payment gateway processing?
What is a static variable in php?