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

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

void* and sizeof()
Hi,

Using void* and sizeof is it possible to get the value of the object ?

I understan

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:

http://www.mydomain.com/directory/index.php

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

CE 7.1 and External GIS integration
Hi All,

We want to develop an application on CE 7.1 which uses GIS features from an exter

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