Jump to content

bocasz

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bocasz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. there are a couple of error in the code you pasted echo "ID:" <select name = 'id'>"; for ($i=0; $i < $num_results; $i++) { $row=mysqli_fetch_array($result); $id = $row["id"]; echo "<option value = "$id"> $id </option>"; } echo "<input type='submit' value='delete' />"; echo "</form>"; should be echo "ID: <select name = 'id'>"; for ($i=0; $i < $num_results; $i++) { $row=mysqli_fetch_array($result); $id = $row["id"]; echo "<option value = ".$id."> ".$id." </option>"; } echo "<input type='submit' value='delete' />"; echo "</form>"; you have to pay attention to the strings
  2. $hex = dechex(rand(0,255)) . dechex(rand(0,255)) . dechex(rand(0,255)); it's going to return the hex equivalent of a random color.
  3. i create a table from a multilevel array wich is loaded from a database and processed, the problem is that the data loaded will some times have gaps in the position that it should be inside a certain html column... i canĀ“t quite explain it so i'll give an example. [0] => array( [name] => john [id] => 2 [data] => array([data1] => array( [0] => array( [value] => 10 [order] => 1 ) [1] => array( [value] => 5 [order] => 3 ) [data3] => array([0] => array( [value] => 30 [order] => 1 ) ) ) | id | Name | Data1 | Data2 | Data3 | | 2 | john | 10 | | 5 | | | 2 | |other varied values...| inside john>data1 there wasnt a order 2 specified so it should create an empty <td> in the correspondent position and then adapt the rest of the table so that there is always the same number of <td> under each colomn. i managed to make that but the code is really really big and messy with a lot of loops, it is currently using too much processing power to achieve that. so i came here to ask if you guys have any suggestion that could help ease this process
×
×
  • 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.