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

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Parse error: syntax error, unexpected $end in
hello,
i receive the error :Parse error: syntax error, unexpected $end in C:xamppxampphtdocsh

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang

need help with date function
i have following form for date

Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

Warehouse Management
Hi,

On our system, we have two storage locations ( A and B ) where A is the main factory

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Alternate messaging
I have 4 strings in MySQL db1

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

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

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