Heero Posted March 31, 2007 Share Posted March 31, 2007 Hi, Been a while since I've touched PHP, but I was looking some code and I don't understand this one line and I can't seem to find any references on it: $qty = $_POST['qty_'.$i] ? $_POST['qty_'.$i] : 0; What is the ? and : do Link to comment https://forums.phpfreaks.com/topic/45031-need-help-understanding-simple-line-of-php-code/ Share on other sites More sharing options...
Jove Posted March 31, 2007 Share Posted March 31, 2007 it's equal to if ... else: if($_POST['qty_'.$i]) $qty=$_POST['qty_'.$i]; else $qty=0; Link to comment https://forums.phpfreaks.com/topic/45031-need-help-understanding-simple-line-of-php-code/#findComment-218614 Share on other sites More sharing options...
rofl90 Posted March 31, 2007 Share Posted March 31, 2007 Awww got a#a message has been posted' i just postd that ;(( Link to comment https://forums.phpfreaks.com/topic/45031-need-help-understanding-simple-line-of-php-code/#findComment-218616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.