Jump to content

bobohob

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bobohob's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for responding. The strange thing is it doesn't always hang. It happens on Mozilla browser, not on Opera. and yes, I use die but with a message. I don't use exists. And the content is very possibly too big to get in one page.
  2. Why does my php page stop loading before it reach 100% ? Thanks.
  3. Thank you all. for($i=1;$i<=5;$i++) { echo $_POST["something_$i"]; } it works.
  4. thanks. but it doesn't work. the "something" is not array.
  5. I want to retrieve these value via "for" loop : $_POST['something_1'] $_POST['something_2'] $_POST['something_3'] $_POST['something_4'] $_POST['something_5'] How to do this ?
  6. I found it's a hassle to code html inside php, for example when you compose a message for email : $message = "<b>................... ............. ......... ........</b>"; is there a better/convenient method ? Thank you in advance.
  7. Do these codes produce different result ? 1 <?php while ($row = $result->fetch_object()) { ?> <a href='view.php?qid=<?php echo $row->id; ?>'>View</a> <?php } ?> 2 <?php while ($row = $result->fetch_object()) { print "<a href='view.php?qid=<?php echo $row->id; ?>'>View</a>"; } ?> Many thanks.
  8. I am using eclipse PDT, Does anyone know how to change the font in the editor ? Thanks.
  9. Maybe this ? : http://www.eclipse.org/pdt/
  10. Thanks for response. the $array (from the your last line $array = mysql_fetch_array($result);) will only contain 2 items no matter what. and beside, $result['cell name'] will only get the column, not the rows.
  11. I'm confused with the fetch_array method. Why it doesn't work outside the loop ? <?php $mysqli = new mysqli("host", "user", "pass", "database"); $query_result = mysqli->query("SELECT acolumn FROM mytable"); // there are 5 rows. // INSIDE THE LOOP (WORKS) : while ($row = $query_result->fetch_array()) { echo $row[0]; } // OUTSIDE THE LOOP (DOESN'T WORK....WHY ???) : $myArray = $query_result->fetch_array(); for ($i=0; $i<5; $i++) { // 5 rows. echo $myArray[$i][0]; } ?> Many thanks.
  12. Thanks. It works! but it doesn't have indentation. btw why this never been mentioned in the tutorial/doc like http://au.php.net/print_r (they just give print_r while the result on their page is vertical) ?
  13. How to display the result of print_r vertically ? It display like this (horizontal) : Array ([0] => fruit [1] => animal [2] => machine ) I was hoping it would display vertically : (see the image below) or http://au.php.net/print_r Thanks. [attachment deleted by admin]
  14. Thanks. Though I never encounter problems (yet ?) for trespassing 80 columns.
  15. No, it's not. I am sure about it. here is another image... [attachment deleted by admin]
×
×
  • 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.