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
Did you know?Explore Trending and Topic pages for more stories like this.
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

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

how can i display php source code snippets ?
I am outputting some pho code .. and I want to display the source code so people can copy and paste

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

PHP Error
On my .php page I have a drop down box that has several names in it. When a user clicks the name &am

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