Skip to content

Instantly share code, notes, and snippets.

@florianboudot
Created May 24, 2016 12:10
Show Gist options
  • Save florianboudot/f8b8b4f0d7e50096dda3668509018899 to your computer and use it in GitHub Desktop.
Save florianboudot/f8b8b4f0d7e50096dda3668509018899 to your computer and use it in GitHub Desktop.
[php] generate id on include
// 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