The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Hi kh99,
The issue is actually this, not the preg_match_all. Code:
$p1 = "/BOT report (.*),(.*)/siU"; if (preg_match_all($p1, $console['chat'], $out1)) { // Define variables for actions $post_data = array(); $post_data['id'] = $out1[1]; $post_data['reason'] = $out1[2]; // More $post_data array vars here } Any ideas how to get the elements of the array? |
#12
|
|||
|
|||
Yeah, check out the description for preg_match_all, the part about the flags: http://us2.php.net/manual/en/functio...-match-all.php. There's two levels of array, but you should be able to get at what you want by using something like $out1[0][0] or $out1[0][1]. Or, if you only expect one match it might be easier to use preg_match() instead.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|