Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

robert bryan
robert bryan
7,255 Points

php question saving multiple string mutations in one var

is the an equivalent to this in php

// arg called str from a function call var str = str.toLowerCase().split(" ");

do i have to do this

// arg called $str from a function call $str = strtolower($str); $str = str_split(" ", $str);

Benjamin Payne
Benjamin Payne
8,142 Points

Hey Robert,

In php you just decorate the methods like so:

$str = strtolower(str_split(" ", $str));

You can just keep decorating methods, however I never go passed two, just for my own sanity.