Skip to content

Instantly share code, notes, and snippets.

@TheOpenDevProject
Last active August 29, 2015 14:28
Show Gist options
  • Save TheOpenDevProject/a449652efc26af0e54ab to your computer and use it in GitHub Desktop.
Save TheOpenDevProject/a449652efc26af0e54ab to your computer and use it in GitHub Desktop.
<?php
public static function ReturnPageWithResults($html) {
$HTMLToInject = preg_replace_callback("{#=(.*?):(.*?):(.*?)#}", function ($captures) {
echo "<pre>";
print_r($result);
echo "</pre>";
}, $html);
return $HTMLToInject;
}
?>
@TheOpenDevProject
Copy link
Author

{#=Action:Result:[p1,p2]#}

Responsible + Traceable = Sustainable

{#=SuperClass:Result:[p2,p4]#}

Array
(
[0] => #=Action:Result:[p1,p2]#
[1] => Action
[2] => Result
[3] => [p1,p2]
)
Array
(
[0] => #=SuperClass:Result:[p2,p4]#
[1] => SuperClass
[2] => Result
[3] => [p2,p4]
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment