Querstion :- find login to print 1.input => ab output => a, ab, b 2. bana output => b, ba, ban, bana, a, an, ana, n,na, a Ans :- $str = "12345"; $ar = []; for($ui=0; $ui < strlen($str); $ui++) { $newstr = ($ui != 0)?substr($str, $ui):$str; for($i=1; $i <= strlen($newstr); $i++) { $ar[] = substr($newstr, 0, $i); } } echo "<pre>"; print_r($ar); Output :- Array ( [0] => 1 [1] => 12 [2] => 123 [3] => 1234 [4] => 12345 [5] => 2 [6] => 23 [7] => 234 [8] => 2345 [9] => 3 [10] => 34 [11] => 345 [12] => 4 [13] => 45 [14] => 5 )
webuncles launched new website which is totally depends on happiness . concept:- everyone have there own happiness in there life, like someone happy when he got a surprise, promotion in job, travel, shopping, and some one happy when they find love. happinesstree is a platform where you can find your own happiness or you also can share your way to be happy.. we are always want to know all about your happiness . This website have there own branches (some possible way which can make you happy.) , we wants you to add your own branch to our happinesstree , or you can read there some stories which is full from happiness. Read our blogs from happiness tree and share your valuable suggestions to us Webuncles a group of IT Expert proudly powered happiness.in .