do while...woes


Posted on 16th Feb 2014 07:03 pm by admin

I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work, the page hangs... what am i doing wrong here??
<?php
$number = 5;
?>
<?php
while ($number < 10){
$number = $number + 1}
?>
<?php
echo $number
//hoping for it to be 10
?>

before you ask, i'm trying to figure out the principal to make this work, I'm not actually trying to make a number less than 10 become 10, but I need to know how to make this work to do some things. Thanks!!

No comments posted yet

Your Answer:

Login to answer
252 Like 43 Dislike
Previous forums Next forums
Other forums

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down me

regex for quoted text within a string
I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape q

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

Strange Oracle Query problem
Ok So I have this PHP class that talks to a Javascript class that basically creates a table of infor

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash