faqts : Computers : Programming : Languages : PHP : kms : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

how to assign results of FOR loop to a variable as a string?

Jan 9th, 2006 00:31
Praveen Kumar Kukkapalli, Timothy Russell,


You can usse string concatenation as shown below.
$str_concat = "";
for($i=0; $i<count($x); $i++)
{
    $str_concat .= $x[$i];
}
Hope this will help you.