[PHP] What's the problem with this PHP code?

2011-11-04 Thread Sophia
Here is the PHP code: ?php $panka =c:can-it-rock- :the-boat-of- :love- ; $pankb = preg_split(':',$panka); $pankc = $pankb{1}; echo ( . $panka . )\n( . $pankc . )\n; ? I keep getting the following error: Sophia-Shapiras-MacBook-Pro:tmp red_angel$

Re: [PHP] What's the problem with this PHP code?

2011-11-04 Thread shiplu
On Fri, Nov 4, 2011 at 1:47 PM, Sophia red_an...@techno-info.com wrote: Here is the PHP code: ?php $panka =c:can-it-rock- :the-boat-of- :love- ; $pankb = preg_split(':',$panka); It should be preg_split('/:/', $panka); $pankc = $pankb{1}; echo ( . $panka . )\n( . $pankc

Re: [PHP] What's the problem with this PHP code?

2011-11-04 Thread tamouse mailing lists
On Fri, Nov 4, 2011 at 2:52 AM, shiplu shiplu@gmail.com wrote: On Fri, Nov 4, 2011 at 1:47 PM, Sophia red_an...@techno-info.com wrote: Here is the PHP code: ?php $panka =   c:can-it-rock-    :the-boat-of- :love-  ; $pankb = preg_split(':',$panka); It should be