Welcome! Log In Create A New Profile

Advanced

PHP Section Seven - String Manipulation

Posted by 77726812Lancevjm 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar PHP Section Seven - String Manipulation
July 18, 2012 02:14PM
Completed Section Seven. This was quite straight forward, I do however feel like this is one area that will become more complex, this and Arrays. Will there be a need for arrays if you're using databases though?

Lance Malgas
Re: PHP Section Seven - String Manipulation
September 23, 2012 12:41PM
Can someone please help me understand why is this array not imploding, to my knowledge it should print: Autumn, Winter, Spring, Summer
It is just printing out "A"
This is in php7p6.html

""
Language: PHP
<?PHP   $seasons = array("Autumn", "Winter", "Spring", "Summer"); $new_textline = implode(",", $seasons);   for ($start=0; $start < count($new_textline); $start++) { print $new_textline[$start] ; }   ?>
Re: PHP Section Seven - String Manipulation
September 24, 2012 06:25PM
Mistake noted, no for loop needed in the above implode statement, my bad!

Language: PHP
<?PHP   $seasons = array("Autumn", "Winter", "Spring", "Summer"); $new_textline = implode(", ", $seasons);     print $new_textline;     ?>
Re: PHP Section Seven - String Manipulation
September 24, 2012 07:26PM
PHP Seven complete
Sorry, only registered users may post in this forum.

Click here to login