note 106630 modified in function.sscanf by danbrown

From: Date: Tue, 29 Nov 2011 15:53:17 +0000
Subject: note 106630 modified in function.sscanf by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-184797@lists.php.net to get a copy of this message
This is more like C/C++ example, but works on PHP too. <?php $qs = "index.php?id=34&name=john"; print_r( sscanf($qs, "%[^?]?%[^?]") ); $qs = "id=34&name=john"; print_r( sscanf($qs, "id=%[^&]&name=%[^&]") ); ?> --was-- This is more like C/C++ example, but works on PHP too. $qs = "index.php?id=34&name=john"; print_r( sscanf($qs, "%[^?]?%[^?]") ); $qs = "id=34&name=john"; print_r( sscanf($qs, "id=%[^&]&name=%[^&]") ); http://php.net/manual/en/function.sscanf.php

« previous php.notes (#184797) next »