如何设置PHP版jQuery插件的参数传递方法?
- 内容介绍
- 文章标签
- 相关推荐
本文共计52个文字,预计阅读时间需要1分钟。
phpfunction test($options=array()) { $defaults=array( 'name'=> 'xxoo', 'sex'=> 'xoxo' ); $options=array_merge($defaults, $options); print_r($options);}
test(array('name'=> 'nidaye'));
<?php function test($options=array()) { $defaults = array( 'name' => 'xxoo', 'sex' => 'xoxo' ); $options = array_merge($defaults, $options); print_r($options); } test(array('name'=>'nidaye')); ?>
本文共计52个文字,预计阅读时间需要1分钟。
phpfunction test($options=array()) { $defaults=array( 'name'=> 'xxoo', 'sex'=> 'xoxo' ); $options=array_merge($defaults, $options); print_r($options);}
test(array('name'=> 'nidaye'));
<?php function test($options=array()) { $defaults = array( 'name' => 'xxoo', 'sex' => 'xoxo' ); $options = array_merge($defaults, $options); print_r($options); } test(array('name'=>'nidaye')); ?>

