Re: [PHP] question about smarty

2009-11-05 Thread Fernando Castillo Aparicio
I'm not sure where is the problem, but can't you just define every changing part in your template as variables and assign them as needed from php? If you need to change the image url, just make it a variable, like in background:url(images/{$img}) Then you just assign the variable as needed in

Re: [PHP] Preview button to show PDF without submitting post data?

2009-11-05 Thread Fernando Castillo Aparicio
You could just open in a new window a php script that generates the preview pdf with a content-type header for pdf. header(Content-type: application/pdf); Or if the preview pdf is not dinamic, just point the url to the pdf. No javascript needed, just a link, o a submit button on a form with

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Fernando Castillo Aparicio
5.2.8, but testing 5.3 in local environment.

Re: [PHP] regex for multiple line breakes

2009-10-14 Thread Fernando Castillo Aparicio
You are replacing 1 or more matchs of a new line. To match 2 or more you can use {2,}. It's a range, first number means min matches, second max matches. Omitting last number means no max limit. $data[txt] = preg_replace('`[\r\n]{2,}`',\n,$data[txt]); De:

Re: [PHP] regex for multiple line breakes

2009-10-14 Thread Fernando Castillo Aparicio
unfortunatelly. The result is the same. It removes all linebreakes but one. I would like to pass this one: - first line second third - But not this one: - third forth Fernando Castillo Aparicio schrieb: You are replacing 1 or more matchs

Re: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread Fernando Castillo Aparicio
I think you are just looking for the key in the wrong place. Try: foreach ( $records as $record ) { foreach( $record as $column=$value ) { echo $column is $value\n; } } You've got the columns names in each record, not in the global recorset. Good luck ;-)

Re: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread Fernando Castillo Aparicio
De: MEM tal...@gmail.com Para: Lester Caine les...@lsces.co.uk; php-general@lists.php.net Enviado: vie,9 octubre, 2009 12:40 Asunto: RE: [PHP] Newbie: Array of objects iteration @LinuxManMikeC and all @All Thanks. I was more or less aware of that possibility,

Re: [PHP] html email showing br instead of line breaks

2009-09-24 Thread Fernando Castillo Aparicio
Have you tried http://es.php.net/manual/en/function.nl2br.php ? I think it's easier and fits your needs. De: Adam Williams awill...@mdah.state.ms.us Para: PHP General list php-general@lists.php.net Enviado: jueves, 24 de septiembre, 2009 20:52:13 Asunto: [PHP]

Re: [PHP] Question: Wai-aria?

2009-09-22 Thread Fernando Castillo Aparicio
Ups! By mistake I didn't reply to all. Resending. Sorry. De: Parham Doustdar parha...@gmail.com Para: php-general@lists.php.net Enviado: martes, 22 de septiembre, 2009 9:41:44 Asunto: [PHP] Question: Wai-aria? Hello there, I have asked on the mailing lists