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

Modal Popup Help
Hi guys, I have a modal popup with an iframe. How can i send data from a label or textbox to the ifr

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

Delete records not in top 15
Hi,

I'm creating a hall of fame page in my game and the page will only display the top 15 sco

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

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