redarrow Posted June 2, 2008 Share Posted June 2, 2008 why dosent the array work please there a blank page want array number [4] <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://mail.live.com/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); $res=explode(' ',$output); //PRINT_R($res); // will work echo " <pre> ".$res[4]." </pre>"; ?> Link to comment https://forums.phpfreaks.com/topic/108446-array-problam/ Share on other sites More sharing options...
rubing Posted June 2, 2008 Share Posted June 2, 2008 don't know... how bout posting the output of print_r($res) & echo $res[4]; Link to comment https://forums.phpfreaks.com/topic/108446-array-problam/#findComment-556026 Share on other sites More sharing options...
mushroom Posted June 2, 2008 Share Posted June 2, 2008 If you have 4 elements in your array they are numbered by default 0,1,2,3 not 1,2,3,4 Link to comment https://forums.phpfreaks.com/topic/108446-array-problam/#findComment-556059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.