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 trialjinhwa yoo
10,042 Pointshelp me
$paging .= '<li class="page current">' . $i . '</li>';
???
can you explain each by each???
$paging = declaring variable.
.= = ???
'<li class="page current">'</li>'; = ???? .$i. = ????
1 Answer
jcorum
71,830 PointsFirst, x .= y is shorthand for x = x . y, where . is the symbol for string concatenation. So "Hello," . " World!" yields "Hello, World!", and "a" .= "b" is the same as "a" = "a" . "b" and yields "ab".
Second, '<li class="page current">'</li>' is a string that contains an li element, and the li tag contains one attribute class="page current".
Presumably this code is in a loop, and what it is likely doing is building a set of <li> elements for an ordered or unordered list.
If there's anything else that is strange, or you're not sure of, please let me know.
jinhwa yoo
10,042 Pointsjinhwa yoo
10,042 Pointsthanks alot.. master...
jinhwa yoo
10,042 Pointsjinhwa yoo
10,042 Points$subString('&searchColumn=' . $searchColumn . '&searchText=' . $searchText;
$sql 'select count(*) as cnt from board_free where ' . $searchColumn .' like "%' . $searchText . '%"';
I don't understand.... plz, help me.