How do i explode this string '||25||34||73||94||116||128' i
need to have a array like this
array (
0 => '25',
1 => '34',
2 => '73',
3 => '94',
4 => '116',
5 => '128'
)
explode("||", $array); didnt work for me i get this array
array (
0 => '',
1 => '25',
2 => '34',
3 => '73',
4 => '94',
5 => '116',
6 => '128',
)
Answer Posted / nilsoft
<?php
$string = '||25||34||73||94||116||128';
$require_array =
explode("||",substr($string,2,strlen($string)-2));
print_r($require_array);
?>
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
hello all, I need some sample placement papers in lion bridge.. can anyone help me?
What sized websites have you worked on in the past?
What is the current stable version of php? What advance thing in php7?
How to calculate the difference between two dates using php?
how to detect a mobile device using php
Which variable declarations within a class is invalid in php?
Tell me what kind of things have you done on the social side?
What is the current stable version of php?
Write a program using while loop?
Name and explain five of the PHP error constants?
Explain me is it possible to destroy a cookie?
What is difference between static and final in php?
sort term descripttion form, report and uery
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What does $_files means?