kamal213 Posted November 24, 2011 Share Posted November 24, 2011 Hi guys Say for example I have a text field with value 20/10/2011 how do I define it so that $x=20, $y=10 and $z=2011 so that I have three variables Thanks Quote Link to comment https://forums.phpfreaks.com/topic/251720-php-splitting-variables/ Share on other sites More sharing options...
codefossa Posted November 24, 2011 Share Posted November 24, 2011 $date = '20/10/2011'; list($d, $m, $y) = explode('/', $date); Quote Link to comment https://forums.phpfreaks.com/topic/251720-php-splitting-variables/#findComment-1290925 Share on other sites More sharing options...
kamal213 Posted November 24, 2011 Author Share Posted November 24, 2011 That's exactly it! Does Exactly what I was looking for! Thanks Kira Porblem Solved! Quote Link to comment https://forums.phpfreaks.com/topic/251720-php-splitting-variables/#findComment-1290926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.