Jump to content

include() with data


AstrosMF

Recommended Posts

i have a seperate data file "data/team_data.php" with the below contents

<?
$green_jersey00_status == "active";
$green_jersey00_number == "00";
$green_jersey00_first_name == "Jessica";
$green_jersey00_last_name == "Locke";
$green_jersey00_position == "INF";
$green_jersey00_b_t == "R-R";
$green_jersey00_ht == "6-0";
$green_jersey00_yrs == "First";
$green_jersey00_hometown == "Conroe, TX (Spring/North Harris)";
$green_jersey00_team == "GC-4 Green";
?>

then i have a file reading the file and outputting some of the values

<?
include("/data/team_data.php");
// $green_jersey00
  echo '<tr  class="rosterrow2 rosterrow" valign="baseline" align="left"><td class="first"></td><td class="rosterText">'; 
  echo $green_jersey00_number; 
  echo '</td><td class="rosterText"><strong>';
  echo $green_jersey00_last_name; 
  echo ', '; 
  echo $green_jersey00_first_name; 
  echo '</strong></a></td><td class="rosterText">'; 
  echo $green_jersey00_position; 
  echo'</td><td class="rosterText">'; 
  echo $green_jersey00_b_t; 
  echo '</td><td class="rosterText" nowrap>'; 
  echo $green_jersey00_ht; 
  echo '</td><td class="rosterText" nowrap>'; 
  echo $green_jersey00_yrs; 
  echo '</td><td class="rosterText">'; 
  echo $green_jersey00_hometown; 
?>

the tables are working correctly but the data is not inputting... see anything??

 

Michael

Link to comment
https://forums.phpfreaks.com/topic/41845-include-with-data/
Share on other sites

figured it out...

<?
include("team_data.php");

// $green_jersey00
  echo '<tr  class="rosterrow2 rosterrow" valign="baseline" align="left"><td class="first"></td><td class="rosterText">'.$green_jersey00_number.'</td><td class="rosterText"><strong>'.$green_jersey00_last_name.', '.$green_jersey00_first_name.'</strong></a></td><td class="rosterText">'.$green_jersey00_position.'</td><td class="rosterText">'.$green_jersey00_b_t.'</td><td class="rosterText" nowrap>'.$green_jersey00_ht.'</td><td class="rosterText" nowrap>'.$green_jersey00_yrs.'</td><td class="rosterText">'.$green_jersey00_hometown; 

?>

Link to comment
https://forums.phpfreaks.com/topic/41845-include-with-data/#findComment-202942
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.