Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($data as $key => $value)
- {
- /* Secure that variables are valid for php */
- if (! preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ims', $key) )
- continue;
- /* Add a new line to the template code */
- $template_code .=
- /* Write varaible name */
- '$' . $key . ' = ' . $this->phpize_var($value, true) . ';' . "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement