PHPrp Posted June 11, 2006 Share Posted June 11, 2006 [code]if($debug){ for($i=0;$i<sizeof($line);$i++){ echo ",line[$i]=".$line[$i]; } } if($line[1]=="HOL"){ $data_source=$line[5]; $tour_op=$line[6]; $depart_date=$line[7]; $depart_date_formatted=user_date_format($line[7]); $dep_airport=$line[8]; $dest_airport=$line[9]; $dep_time=$line[10]; $arr_time=$line[11]; $arr_uk_date=$line[12]; $arr_uk_point=$line[13]; $nights=$line[14]; $flight_type=$line[15]; $adult_price=$line[16]; $child_price=$line[17]; $child_max_age=$line[18]; $availability=$line[19]; $rating=$line[20]; $arr_dest_time=$line[21]; $dep_dest_time=$line[22]; $flight_no_out=$line[23]; $flight_no_ret=$line[24]; $travel_code=$line[25]; $resort_code=$line[26]; $resort_name=$line[27]; $hotel_name=$line[29]; $board_basis=$line[30]; $board_basis_text=$_SESSION["sess_board_basis_array"][$line[30]]; $holiday_code=$line[31]; $resort_features=$line[32]; $accom_features=$line[33]; $brochure_code=$line[34]; $brochure_page=$line[35]; $carrier_name=$line[36]; $product_name=$line[37]; } [/code]Can anyone help me to understand what this part of the code doing. I undestood that this is a parof the array. HELP.. Link to comment https://forums.phpfreaks.com/topic/11741-php-array/ Share on other sites More sharing options...
legohead6 Posted June 12, 2006 Share Posted June 12, 2006 [!--quoteo(post=382636:date=Jun 11 2006, 03:26 PM:name=PHPrp)--][div class=\'quotetop\']QUOTE(PHPrp @ Jun 11 2006, 03:26 PM) [snapback]382636[/snapback][/div][div class=\'quotemain\'][!--quotec--][code]if($debug){ for($i=0;$i<sizeof($line);$i++){ echo ",line[$i]=".$line[$i]; } } if($line[1]=="HOL"){ $data_source=$line[5]; $tour_op=$line[6]; $depart_date=$line[7]; $depart_date_formatted=user_date_format($line[7]); $dep_airport=$line[8]; $dest_airport=$line[9]; $dep_time=$line[10]; $arr_time=$line[11]; $arr_uk_date=$line[12]; $arr_uk_point=$line[13]; $nights=$line[14]; $flight_type=$line[15]; $adult_price=$line[16]; $child_price=$line[17]; $child_max_age=$line[18]; $availability=$line[19]; $rating=$line[20]; $arr_dest_time=$line[21]; $dep_dest_time=$line[22]; $flight_no_out=$line[23]; $flight_no_ret=$line[24]; $travel_code=$line[25]; $resort_code=$line[26]; $resort_name=$line[27]; $hotel_name=$line[29]; $board_basis=$line[30]; $board_basis_text=$_SESSION["sess_board_basis_array"][$line[30]]; $holiday_code=$line[31]; $resort_features=$line[32]; $accom_features=$line[33]; $brochure_code=$line[34]; $brochure_page=$line[35]; $carrier_name=$line[36]; $product_name=$line[37]; } [/code]Can anyone help me to understand what this part of the code doing. I undestood that this is a parof the array. HELP..[/quote]looks like a form putting all the imput fields into an array! ......but thats just a guess Link to comment https://forums.phpfreaks.com/topic/11741-php-array/#findComment-44466 Share on other sites More sharing options...
kenrbnsn Posted June 12, 2006 Share Posted June 12, 2006 You will have to show us some lines before this chuck to really tell you what's going on. For instance where is the array $line coming from? To me, it looks like $line is coming from a database and this code is assigning each field to a variable. If that is the case, there are easier way's of doing this, but we really need to see more code.Ken Link to comment https://forums.phpfreaks.com/topic/11741-php-array/#findComment-44469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.