You are viewing our Forum Archives. To view or take place in current topics click here.
Need some help with PHP
Posted:

Need some help with PHPPosted:

joeisjoe5
  • Rising Star
Status: Offline
Joined: Jun 18, 201212Year Member
Posts: 775
Reputation Power: 31
Status: Offline
Joined: Jun 18, 201212Year Member
Posts: 775
Reputation Power: 31
So I am trying to display a list from another website in mine, it all works fine but only the first word of 'title' is stored. I know that the whole title is retrieved from the other website so how do I get it to store all of it.

Here is the code if it helps.

<?php
include "simple_html_dom.php";
   $page = file_get_html("http://www.blade-edge.com/images/KSA/Flights/craft.asp?r=true&db=dunai");
echo "<table id=list>";
   foreach($page->find('html/body/div/div[2]/ol/a') as $key=>$element) {
      if ($element->title != "No craft within this SOI"){
      $ships[$key] = $element->plaintext;
      $shipTitles[$key] = $element->title;
      $shipLinks[$key] = $element->href;
      echo "<tr>";
      echo "<td title =".$shipTitles[$key]." >";
      echo $ships[$key];
      echo "</td>";
      echo "</tr>";
   }
   }
      echo "</table>";
?>
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.