Jump to content

remarsh

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

remarsh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When i implement your suggestion i get; Fatal error: Cannot use [] for reading in / on line 25 Must be against the syntax or something. Don't quote me on it tho! hehe
  2. what a schoolboy error! i cant believe it thank you so much for your advice. i would have stared at the screen for hours before i recognised that. thanks again
  3. thanks for replying! I tried your tip and again it still only outputs the data that was last stored in the array. its a real head scratcher! tried FOR loops and it simply outputs the same data over and over again. ideas?
  4. I've searched high and low for pointed but im driving myself bonkers in getting this working! Building a website and trying to keep everything efficient and modular however and have problems getting my head around OOP and Arrays with MySQL. Class ABC { static $taken = array(); function setArray() { //connect and query etc.. // extract all the mysql and store it in an array of taken urls while($row = mysql_fetch_array($results)) { $taken = $row['the_url']; } } function getArray() { //return the array so that a btree can search through them. return $taken; } } $hello = new ABC; $hello->setArray(); $hello->getArray(); echo $hello; however i only every seem to get the first result and doesnt seem to stay as an array i tried seaching this website but keep getting 'daemon error' so any pointers to the right direction would be greatly appreciated!!! thankyou
×
×
  • 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.