![]() |
split help.. i think?
I have a variable, $threadinfo[foousers], which containts a list of users separated by spaces. (ie. $threadinfo[foousers] = "foo1 foo2 foo3").
I'm trying to add code to newreply.php that will check the current user against that list, and if a positive match is found it will return foo(); I've tried using the illegal username code, but I just can't seem to tweak it right. Any help would be appreciated. ;) |
Wouldnt this be a job for good old Array??
|
You can only return something if you areb within a function and IIRC there are none in newreply.php anyway this should do what you want:
PHP Code:
|
Whats the Explode part about?? (Sorry just never seen that before)
|
Explodes all the values using ' ' (space) as the seperator into an array, for example:
PHP Code:
|
o k
Yeah i get it :) Cheers for explaining. |
Woops, forgot about this.. actually, I have it all working using:
PHP Code:
|
All times are GMT. The time now is 08:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|