hisham
IS-IT--Management
- Nov 6, 2000
- 194
I have the following series of strings ie:
$str = "7hi"
or
$str = "15hello";
my question: how to print :
" this is 15 and hello "
I tried :
but it wont print $results[0] as 15 !! it just prints hello
Thanks in advance.
$str = "7hi"
or
$str = "15hello";
my question: how to print :
" this is 15 and hello "
I tried :
Code:
<?
$str = "15hello";
$results = preg_split('/^[0-9]+/', $str);
echo "this is $results[0] and $results[1]";
?>
Thanks in advance.