ModernMerlin

msg:4459269 | 2:37 am on May 30, 2012 (gmt 0) |
I no longer need an answer to this. I'm using something else now.
|
g1smd

msg:4459314 | 6:58 am on May 30, 2012 (gmt 0) |
The sample code you supplied didn't contain preg_split
|
rlange

msg:4459469 | 2:33 pm on May 30, 2012 (gmt 0) |
I suspect the issue was that you simply changed split to preg_split without also changing the first argument. The relevant line should be:
$parts = preg_split("/ /", $fullName); Although using explode [us3.php.net] may be better in this case. -- Ryan
|
rocknbil

msg:4459516 | 4:19 pm on May 30, 2012 (gmt 0) |
Agreed, any single character is not really a pattern, any of the 'reg functions are meant to match on patterns. :-)
|
SteveWh

msg:4459569 | 6:16 pm on May 30, 2012 (gmt 0) |
I know this might seem obvious, but it seems to be frequently misunderstood. When you get a PHP warning that says "____ is deprecated. Use ____ instead", it doesn't mean that you should just change the name of the function. It means that you should go to the PHP manual ( [php.net...] ), look up the function you were using, look up the new function, and change your code so it uses the new function properly, using the rules and requirements for its use. The two functions are often very similar, but they won't be exactly the same.
|
|