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

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

PHP mail() returns true but doesn't work
First off I apologize if this is a newbie question, and I generally don't like asking questions that

How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?

Question about GD library
I am trying to make an image that shows a random quote from my database.


However I want t

Problem with an browser game.
Hello,i just joined that great forum and i got php prob,its kinda freaky...anyway i got browser game

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

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

TimeStamp Column Problem...
I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here.

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