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

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

update sql when refresh - php
hi
I have made a table (attachement)

the users can update the sql database using + or x bu

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

PHP Code / Script To check weather the given email exists in a domain
Hi,

I want to implement the following in my web page

in sign up we will ask to enter u

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

Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief t

Javascript using window.location seems to lose state
Not sure what forum so let me know if I'm in the wrong place. I have a main window with a ajax grid

Libraries in C++
Hi all,

I have two libraries. one is based targeted on linux platform and uses another li

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

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