mforan Posted January 3, 2009 Share Posted January 3, 2009 cant get this: echo ($recruit[$i][1],$recruit[$i]15]) to echo out "value value", but i want it to show as "value (value)" been trying using , " and ( no luck lol? Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/ Share on other sites More sharing options...
Adam Posted January 3, 2009 Share Posted January 3, 2009 echo "{$recruit[$i][1]} ({$recruit[$i][15]})"; edit: made a mistake! A Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/#findComment-728970 Share on other sites More sharing options...
mforan Posted January 3, 2009 Author Share Posted January 3, 2009 that doesnt work lol Array[1] (Array[15]) Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/#findComment-728972 Share on other sites More sharing options...
Adam Posted January 3, 2009 Share Posted January 3, 2009 hmmm try first: echo $recruit[$i][1] . '<br />'; echo $recruit[$i][15] . '<br />'; See what that displays. If not what you're expecting please show us the code the defines the arrays.. A Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/#findComment-728977 Share on other sites More sharing options...
mforan Posted January 3, 2009 Author Share Posted January 3, 2009 i guess this does it: <?php echo $recruit[$i][1] . ' ('; echo $recruit[$i][15] . ')'; ?> but that is 2 echos lmao. surely it can be done in just 1? hmm i dunno. it uses this: $result = mysql_query($query) or die("Error: ".mysql_error()); $recruit = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$recruit[] = $row;} for ($i = $start; $i < $finish; $i++) { Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/#findComment-728981 Share on other sites More sharing options...
Adam Posted January 3, 2009 Share Posted January 3, 2009 echo $recruit[$i][1] . ' (' . $recruit[$i][15] . ')'; A Quote Link to comment https://forums.phpfreaks.com/topic/139374-solved-echo-prob/#findComment-728983 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.