Questions tagged [modifier]
347 questions
1
vote
1 answer
Show total price for modifier in Expresso Store
Is there a way to show the total price for products with modifiers in dropdowns instead of how much extra they are?
For instance, in the shop I'm developing, a bouquet of flowers costs £30 for a regular size. You can also get a large for an…

Alissa J. Robinson
- 151
- 3
1
vote
2 answers
Unknown modifier in my code
php
$Src = 'images/pages/clients/logos/clnt_aljareera_img.jpg';
$pttn= '/&Src:'.$Src.'/';
$string=preg_replace($pttn,'',$string,1);
?>
//output Error: Unknown modifier 'p' in

fhonics
- 113
- 9
1
vote
2 answers
How can I assign a new variable inside of a Smarty modifier function?
I wrote a basic Smarty modifier that emulates JavaScript's push.
function smarty_modifier_push($array, $push){
if(!isset($array)){
$array = array($push);
}elseif(is_array($array)){
$array[] = $push;
}
return…

Aust
- 11,552
- 13
- 44
- 74
1
vote
1 answer
alternative for function preg_replace e/ modifier
Anybody knows how to change this function with preg_replace and the e/ modifier
The e/ modifier will be depreciated.
function charset_decode_utf_8 ($string) {
/* Only do the slow convert if there are 8-bit characters */
/* avoid using 0xA0…

ceasar
- 1,512
- 3
- 17
- 25
1
vote
1 answer
preg_match() giving Unknown modifier '$'
I've got the following code
function redireectIfNeeded(){
$url = $_SERVER["REQUEST_URI"];
if(preg_match("/\.php/$", $url))
header("Location: ".preg_replace("/\.php/",$url));
}
Which is giving me the following error.
[24-Jul-2012 19:14:18] PHP…

dpDesignz
- 1,909
- 10
- 34
- 70
1
vote
3 answers
C# class/methods modifiers
I'm trying to make spreadsheet with class/method modifiers. The spreadsheet itself can be located here, although I have some questions:
1) As I read, methods also can be sealed, but what's the purpose of this? Protecting method against…

Darj
- 1,403
- 1
- 17
- 47
1
vote
1 answer
Only one item returned despite global modifier use in Regex
I'm using the javascript code below trying to extract the number after gallery-entry_ in the html markup below but instead of giving all matches it only returns the first one despite my use of the g modifier in the regex. Any idea why ?