I’m working on a CodeIgniter project and trying to get the id of this URI:
http://example.com/myDomain/index.php/public/calendar/gestionEvent?id=c2pnumqnqr0dg9tgmaklho5280@google.com
I want the controller to delete or update the event using this ID.
I tried $this->uri->segment(4)but it doesn’t seem to work and doesn’t show anything.
in cotroller
you can not use uri segment here
here you can use uri segments
http://codeigniter.com/user_guide/libraries/uri.html
if you want to get only the id with out
@google.comyou can simply useexplode()