Php While

  1. Php While Function
  2. Php While Loop Array
  3. Php While Array
  4. Php While Exit

PHP, just like most other programming languages has multiple ways to loop through arrays. The most popular ways to do it usually is with a while, for and foreach operator, but, believe it or not, there are more ways to do it with PHP. In this article, I will walk-through each possibility for reading arrays whilst looping. PHP do while Loop Statement Last update on February 26 2020 08:09:52 (UTC/GMT +8 hours) Description. There is a small difference between the while and do while loops. PHP Arrays; For Loops; As with most programming languages, PHP supports the 'while' loop. PHP 'while' loops allow you to execute the same piece of code continuously while a certain condition is true. Once the condition becomes false, the program will break out of the loop and continue processing the rest of the page. Loops While Loop Do While Loop For Loop Foreach Loop Break/Continue. PHP Functions PHP Arrays. PHP has some built-in functions to handle JSON. @Bizarre I haven't used PHP in a few years, but I used to use Smarty. Smarty.net It supported template inheritance, which was very handy. You could have classes.

Hi, I am new to php and html, so I need some help with a problem: I am trying to make a form where you can select from a dropbox, but thae data from the dropbox should be retrieved from a sql database.
If I save the code bellow as php, the dropbox is created and retrieves the data from sql, but then the submit button (together with everything else I put after the while loop) disappeares. If I save it as a html file, the form and submit button works, but it doesn't retrieve any data from sql database.

Thanks

  • 5 Contributors
  • forum5 Replies
  • 4,289 Views
  • 6 Years Discussion Span
  • commentLatest PostLatest Postby kosikondo

Recommended Answers

Php While Function

You're missing an opening < on your submit button input.

Php While Loop Array

Jump to Post

Hi,
As per 'pixelsoul' please check syntex i.e. <

Also I have suggest another coding sytle. i.e.
a) Do Not open connection in <select>
b) First Opne Connection and get result
c) Fetch only result loop in <select>
d) You can also use following coding style to better understand …

Php while breakJump to Post

All 5 Replies

You're missing an opening < on your submit button input.

Hi all,
im sorry, im just a beginner, I had never come across to such circumstances.
Submit a form, with while loop, how am i going to retreive every single value submitted from the form?

can someone guide me,please. How to retreive all the value after submit
Thank you!

  • 2 Contributors
  • forum2 Replies
  • 2,589 Views
  • 9 Hours Discussion Span
  • commentLatest PostLatest Postby qwertpink
Php while break

Recommended Answers

Example

Php While Array

Use $_POST to get the values submitted in the form (use for each field name and replace the word fieldname with your actual field names).

WhilePhp WhileJump to Post

All 2 Replies

Php While Exit

Use $_POST to get the values submitted in the form (use for each field name and replace the word fieldname with your actual field names).