PDA

View Full Version : addin a string to a string.


insanctus
06-28-2003, 01:45 AM
$sangnews = $sangnews $sangnew;

Any one know why that is a parse error ?

filburt1
06-28-2003, 01:48 AM
Because it's syntaxually incorrect. Use:

$sangnews .= $sangnew;

...which is the same as:

$sangnews = $sangnews . $sangnew;

...which is the same as:

$sangnews = "$sangnews$sangnew";

...which means "append $sangnew to $sangnews" (I'm tired of typing "sang", ugh) :)

insanctus
06-28-2003, 01:52 AM
Ya I had just did $sangnews = "$sangnews, $sang";

Went to delete this since I figured it out but ya had replyed

Thanks for the promt reply.... I now have news on my portal I am making for vb3 It is up on my main but still adding to it :)