![]() |
Need help with PHP code
Anyone know why the following does not return desired results and how to get it to?
Code:
$string = 'a,b,c,d'; |
Code should have read:
Code:
$string = 'a,b,c,d'; |
who don't you do a print_r($matchedtext) to see what's in there?
|
not sure exactly what you are trying to do here, but take some time to read up on regular expressions in PHP and you should be able to figure it out.
http://www.regular-expressions.info/php.html http://www.php.net/manual/en/function.ereg.php |
Quote:
Array ( [0] => a [1] => a [2] => [3] => ) My understanding is matchedtext[0] is supposed to return the complete string matched, matchedtext[1] is supposed to return the substring which starts at the first left parenthesis, matchedtext[2] the next and so on. For some reason matchedtext[2] is not returning the letter "c" as I would expect. |
Quote:
|
You owe me a blow job.
It could be shorter, but that takes time, more thought and money. PHP Code:
|
thank you!
|
| All times are GMT -7. The time now is 12:38 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123