Created
May 24, 2016 12:10
-
-
Save florianboudot/f8b8b4f0d7e50096dda3668509018899 to your computer and use it in GitHub Desktop.
[php] generate id on include
This file contains hidden or 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
// every include of this file in a page will generate a different id to use | |
// useful for form elements | |
<?php $id = isset($id) ? $id + 1 : 0; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment