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 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); 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! Link to comment https://forums.phpfreaks.com/topic/251720-php-splitting-variables/#findComment-1290926 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.