Saturday, May 2, 2009

Re: Telling PHP to put "&" NOT "&"

Here is the code by the way...

function restore_html_ecoded_characters(&$pArray){
foreach($pArray as $key => $value){
if(is_array($value)){
restore_html_ecoded_characters($value);
}else{
$pArray[$key] = str_replace("_#", "&#", $value);
}
}
}
In Controller:

function save(){
$this->layout = null;

$thisdata = $this->data;
restore_html_ecoded_characters($thisdata);
...
$this->Denouncement->saveAll($thisdata);
...

Is there any weird thing to know about when trying to edit $this->data?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: