-
-
Save Danack/4bfe9810b3b8ff920aba9170c8917d41 to your computer and use it in GitHub Desktop.
esprintf example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$params = [ | |
':html_items_by_label' => track_changes::get_item_label_by_type($item), | |
':html_item_names' => $item['entity_name'], | |
':attr_entity_id' => $item['entities_id'], | |
':attr_item_id' => $item['items_id'], | |
':html_item_id' => $item['items_id'], | |
':attr_item_url' => url_for('items/info','path=' . $item_info['path']['full_path']), | |
':html_name' => $item_info['name'], | |
':html_comment' => strlen($comment) ? $comment . '':'', | |
':html_track_changes' => track_changes::get_created_by_label($item), | |
':html_date' => format_date_time($item['date_added']) | |
]; | |
$html_src .= ' | |
<tr> | |
<td>:html_items_by_label</td> | |
<td>:html_item_names</td> | |
<td><a href="#" onClick="set_filter_by_id(:attr_entity_id, :attr_item_id)">:html_item_id</a></td> | |
<td style="white-space: normal;"><a target="_new" href=":attr_item_url">:html_name</a></td> | |
<td style="white-space: normal;"> :html_comment '. $html_fields . '</td> | |
<td>:html_track_changes</td> | |
<td>:html_date</td> | |
</tr> | |
'; | |
$html = esprintf($html_src, $params); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment