How can I use the value $1 as parameter in a php function?
example:
[tag]name[/tag]
name would be $1 so I want to use the method getSerie($1)
bump
I'm not really sure on what you want to do, neither exactly how parse_bbc works, unfortunately.
But if you look at, eg, the "email" BBC
array(
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
// !!! Should this respect guest_hideContacts?
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
$1 goes into the link construction directly, so I assume you can just use it straight on.
You can check other BBC codes in Subs.php, function parse_bbc, maybe it will give you a better overview.
Lainaus käyttäjältä: margarett - huhtikuu 14, 2014, 02:47:38 IP
I'm not really sure on what you want to do, neither exactly how parse_bbc works, unfortunately.
But if you look at, eg, the "email" BBC
array(
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
// !!! Should this respect guest_hideContacts?
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
$1 goes into the link construction directly, so I assume you can just use it straight on.
You can check other BBC codes in Subs.php, function parse_bbc, maybe it will give you a better overview.
The thing is I want to use the value to call my php function what I want to achieve is someting like this [name]test[/name] then I want to call a php function with the value "test" and grab all the info from my database and display that.
I noticed the same thing like you did it seems you an only use the value $1 directly in the construction so I was wondering if it was possible to get the value that $1 holds.
(I hope I made a little sense)