OldHatt45
asked on
split, REG_EMPTY, and jQuery
I have a case where I'm trying to use "jCarosel". I have setup a database query (which does work) and returns a result set. The result set is then brought back into a string variable via mysql_fetch_assoc, using "||" as the field separator.
I then instantiate the array I want to use ($images = array(); ).
The very next thing I do is $images = split('||', $StringToReturn2);
To verify that the $StringToReturn2 does in fact contain results I do an "echo $StringToReturn2;" immediately before the array is established.
I get the following error message:
<b>Warning</b>: split() [<a href='function.split'>func tion.split </a>]: REG_EMPTY in <b>C:\inetpub\wwwroot\BACE \jcarousel \examples\ dynamic_aj ax_php_BAC EMod.php</ b> on line <b>71</b><br />
1<br />
I think this is telling me that the $StringToReturn2 variable is empty, but I'm not sure.
I need to get this going and I don't understand why the error.
Thanks in Advance
OldHatt45
I then instantiate the array I want to use ($images = array(); ).
The very next thing I do is $images = split('||', $StringToReturn2);
To verify that the $StringToReturn2 does in fact contain results I do an "echo $StringToReturn2;" immediately before the array is established.
I get the following error message:
<b>Warning</b>: split() [<a href='function.split'>func
1<br />
I think this is telling me that the $StringToReturn2 variable is empty, but I'm not sure.
I need to get this going and I don't understand why the error.
Thanks in Advance
OldHatt45
$StringToReturn2 = "http://sentinel/BACE/"; //Prepend root location to each value returned.
while ($row_rsBACEstkType2 = mysql_fetch_assoc($rsBACEstkType2)) {
foreach($row_rsBACEstkType2 as $value1) {
$StringToReturn2 .= $value1.'||http://sentinel/BACE/';
}
}
echo $StringToReturn2;
$images = array();
$images = split('||', $StringToReturn2);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gentlemen and/or Ladies,
Both solutions worked! Both solutions were "simple" and clear and provide me with what I need. I just need to see which of the 2 I will actually use. Since I looked at the answers you both gave at the same time, I feel it only fair to split the points. Hope this is OK with both of you.
Thank You again
OldHatt45
Both solutions worked! Both solutions were "simple" and clear and provide me with what I need. I just need to see which of the 2 I will actually use. Since I looked at the answers you both gave at the same time, I feel it only fair to split the points. Hope this is OK with both of you.
Thank You again
OldHatt45
ASKER
Both solutions worked! I just need to see which of the 2 I will actually use. Since I looked at the answers you both gave at the same time, I feel it only fair to split the points. Hope this is OK with both of you.
Thank You again
OldHatt45