Whenever I try to print a string and a variable together I get incorrect
output. After echoing the variable the rest of the line is ignored.
//eg.
$var1 = "test";
echo "This is a " . $var1 . "! This is only a " . $var1;
//returns:
This is a test
//instead of
This is a test! This is only a test.
//At first I corrected the problem by bypassing it like so:
$var1 = "test";
echo "This is a " . $var1;
echo "! This is only a " . $var1;
//thought it was just a weird nuance, but the fact that it's doing similar
things with my pattern matches, it has to be something else.
//Pattern matching:
$pattern = '<tr><td>(.*)</td></tr>';
$string = '<tr><td>Test Status</td></tr><tr><td class=\"classy\">Test
Date</td></tr>';
eregi($pattern, $string, $output);//just an example, won't work for
cutnpaste
//running thru eregi returns
<tr><td>Test Status</td></tr><tr><td class=\"classy\">Test Date</td></tr>
//AND everything else following the (*) in $pattern!
//instead of
Test Status
I'm really at a loss as to why this is like this!
Any ideas?
--ScareCrowe
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----