Jump to content

hackalive

Members
  • Posts

    652
  • Joined

  • Last visited

Everything posted by hackalive

  1. This error is causing some serious problems for me so if anyone can help it would be much appreciated
  2. okay this works $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); $AL = $AL['0']; for($i=0;$i<=$AL;$i++) { ${'AL'.$i} = implode("", ${'AL'.$i}); } return $AL1; but I get this message line 123 is $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); help is much appreciated, and thanks to all those who have helped so far
  3. $AL.$i would return $AL1 etc which is required to be as such $AL[$i] is incorrect, thanks for the help though any one else?
  4. This code is meant to implode $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); $AL = $AL['0']; for($i=0;$i<=$AL;$i++) { $AL.$i = implode("", $AL.$i); } Basically what should happen is that $i is the maximum position value and then will implode all $AL# into just $AL# so if max position is 9 it should loop through doing the implode for $AL0, $AL1 etc upto and including $AL9, the $i should reflect the moving up value till $i=9 any help would be so much appreciated, thanks in advance
  5. for($i=0;$i<=$AL;$i++) { $AL.$ii = implode("", $AL.$ii); } now replaces the previous equivelant, but it is still not working, it has something to do with that for part and its really annoying me. Basically what should happen is that $i is the maximum position value and then will implode all $AL# into just $AL# so if max position is 9 it should loop through doing the implode for $AL0, $AL1 etc upto and including $AL9, the $i should reflect the moving up value till $i=9
  6. and this should do the implodes, but its not working $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); $AL = $AL['0']; for($i=0;$i<=$AL;$i++) { $AL = $AL.$i; $AL.$i = implode("", $AL); } return $AL1;
  7. I have this code $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); but it returns "Array" not the number any ideas?
  8. okay I'll give it a go thanks, i'll post again if it dosent work
  9. correct $AL1 is an 'array' which later I will implode
  10. someone must have an idea
  11. let me know if I am trying to do the impossible and let me know a good alternative then
  12. so I have code which gets all this db stuff, like a field called position now I need some code which will then add the value of position to a variable $AL$position{$id} while $AL is fixed $position needs to shift with the position so $AL1 is for position 1 and then an array {$id} with the id field filling that part ideas much appreciated
  13. hi guys how do I join an array such as $array[0] = "me", $array[1] = "you" into a single string so $string = meyou ? All help is much appreciated
  14. I have no idea where to get started; here i what I want to do In a PHP file I have something like this "<div id="header"><PL1></header><div id="content"><PL2></div>" now I need to group based on the INT 0 to 9 and then relate it to the relevant PL# so PL0 is 0 etc so I end up with $1, $2, etc and then can do a replace so <PL1> becomes $1
  15. someone please........
  16. so basically I need a way to add several records from a DB that have the same "position" INT and join them into one variable relative eg $1 etc thanks
  17. okay I guess I should be more specific, In a PHP file I have something like this "<div id="header"><PL1></header><div id="content"><PL2></div>" now I need to group based on the INT 0 to 9 and then relate it to the relevant PL# so PL0 is 0 etc so I end up with $1, $2, etc and then can do a replace so <PL1> becomes $1 any help on how to do this would be much appreciated
  18. any ideas guys, I really need to solve this
×
×
  • 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.