puting for loop in 1 value


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

hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i++)
{
echo $i ;
}
?>
the output will be: 12345

how do i put the result in one value ,some thing like :

if the result is 12345 then it will be equal to $the_value

and when i echo $the_value , the result will be 12345

the quastion is how to put the result of the forloop in one value for later use

thanx

No comments posted yet

Your Answer:

Login to answer
305 Like 10 Dislike
Previous forums Next forums
Other forums

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

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

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a p

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

A Few Questions
Hi, I want to ask a few questions that I can't seem to find..

1) I'm creating a "shortcu

Guixt issue
Hello all,

We are experiencing the following problem with Guixt:

Some transact

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