note 80116 added to language.oop5.magic

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
code that was posted below:
<?php
            $str = '';
            $values = array_values($var);
            for ( $i=0; $i<count($values); $i++ ) {
                $str .= "'".$values[$i]."' ,";
            }   
?>

Would of been so much easier written as 

$var = "'".implode("', '",$var)."'";

If you really wanted to do it by eval that is instead of call_user_func_array
----
Server IP: 209.41.74.194
Probable Submitter: 24.163.83.86
----
Manual Page -- http://www.php.net/manual/en/language.oop5.magic.php
Edit        -- https://master.php.net/note/edit/80116
Del: integrated  -- https://master.php.net/note/delete/80116/integrated
Del: useless     -- https://master.php.net/note/delete/80116/useless
Del: bad code    -- https://master.php.net/note/delete/80116/bad+code
Del: spam        -- https://master.php.net/note/delete/80116/spam
Del: non-english -- https://master.php.net/note/delete/80116/non-english
Del: in docs     -- https://master.php.net/note/delete/80116/in+docs
Del: other reasons-- https://master.php.net/note/delete/80116
Reject      -- https://master.php.net/note/reject/80116
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.