darkfreaks Posted July 11, 2012 Share Posted July 11, 2012 i am trying to go from procedural style coding to PDO i do have one slight question. if i have an include file for the database connect do i still need to define each variable inside new pdo? Link to comment https://forums.phpfreaks.com/topic/265538-switching-to-pdo/ Share on other sites More sharing options...
xyph Posted July 11, 2012 Share Posted July 11, 2012 My guess is no, but you're being very vague. Objects are always passed by reference. Try it? <?php $obj = new fancyclass; $obj->val = 'foobar'; fancyfunc($obj); // outputs foobar; function fancyfunc($obj) { echo $obj->val; } class fancyclass { public $val; } ?> Link to comment https://forums.phpfreaks.com/topic/265538-switching-to-pdo/#findComment-1360881 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.