php - Foreach through an array without looping -


in following code:

<?php     foreach($this->params $key=>$val)     {       $this->rawrequest .= "&$key=$val";     } ?> 

how $this->params $key=>$val without looping?

i agree @rjdown simplest way create query string based on array keys , values http_build_query

$buildqstring = http_build_query($this->params); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -