Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Nov 7, 2026
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Nov 4, 2026
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Another PHP problem machan :(
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="GT9" data-source="post: 15390149" data-attributes="member: 478359"><p><span style="font-size: 12px"><span style="color: DarkRed">මචන් මේ ප්රශ්නෙදිනම් මම මාර විදියට වැටිල ඉන්නේ. වෙනද නම් ටික වෙලාවක් දඟලල කොහොම හරි ප්රශ්නෙ ලිහා ගන්නව ඒත් මේක මට තාම ගොඩදාගන් බැරි උනානේ...<img src="/styles/default/xenforo/smilies/default/no.gif" class="smilie" loading="lazy" alt=":no:" title="No :no:" data-shortname=":no:" /><img src="/styles/default/xenforo/smilies/default/dull.gif" class="smilie" loading="lazy" alt=":dull:" title="Dull :dull:" data-shortname=":dull:" /><img src="/styles/default/xenforo/smilies/default/baffled.gif" class="smilie" loading="lazy" alt=":baffled:" title="Baffled :baffled:" data-shortname=":baffled:" /></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">php දන්න කොල්ලෝ එළකිරියේ ගොඩක් ඉන්නවනේ.. මේක කරන විදියට කියල දෙන්න මචන්ලා.. <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">මට ඕන මචන්ලා function එකක් තවත් php function එකක් ඇතුලේ call කරන්න...</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">මෙන්න මගේ කෝඩ් එක..</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">[PHP]<?php</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">namePrint('Rajitha');</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">function namePrint($name) { </span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"> echo $name;</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">}</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">wrap('tobaco');</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">function wrap($txt) {</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"> global $name;</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"> echo " Your username is ".namePrint($name)." ".$txt."";</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">}</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">?>[/PHP]</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">මේ කෝඩ් එක run කරාම එන්නේ... </span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">[CODE]Rajitha Your username is tobaco[/CODE]</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">කියලා.. ඒත් මට එන්න ඕන...</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">[CODE]Rajitha Your username is Rajitha tobaco[/CODE]</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">කියල... මේ කෙදි ප්රශ්නේ මචන්ලා. ඔය wrap() කියල function එක ඇතුලේ තියෙන namePrint($name) කියල කෑල්ල වැඩ කරන්නේ නැති එක.. error එකක් එන්නෙත් නෑ. මට ඕන මේ කෑල්ල කොහොම හරි වැඩ කරවගන්න.. ඒත් code structure එක වෙනස් වෙන්නත් බෑ.. මට functions හරහා.. variables වලට values assign කරන්න ඕන.. </span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">මේ වගේ..namePrint('Rajitha'); හා wrap('tobaco');</span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 12px"><span style="color: DarkRed">මේක කරගන්න විදිය කියල දෙන්න මචන්ලා ලෙකු උදව්වක්..<img src="/styles/default/xenforo/smilies/default/sorry.gif" class="smilie" loading="lazy" alt=":sorry:" title="Sorry :sorry:" data-shortname=":sorry:" /><img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /><img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></span></p></blockquote><p></p>
[QUOTE="GT9, post: 15390149, member: 478359"] [SIZE="3"][COLOR="DarkRed"]මචන් මේ ප්රශ්නෙදිනම් මම මාර විදියට වැටිල ඉන්නේ. වෙනද නම් ටික වෙලාවක් දඟලල කොහොම හරි ප්රශ්නෙ ලිහා ගන්නව ඒත් මේක මට තාම ගොඩදාගන් බැරි උනානේ...:no::dull::baffled: php දන්න කොල්ලෝ එළකිරියේ ගොඩක් ඉන්නවනේ.. මේක කරන විදියට කියල දෙන්න මචන්ලා.. :) මට ඕන මචන්ලා function එකක් තවත් php function එකක් ඇතුලේ call කරන්න... මෙන්න මගේ කෝඩ් එක.. [PHP]<?php namePrint('Rajitha'); function namePrint($name) { echo $name; } wrap('tobaco'); function wrap($txt) { global $name; echo " Your username is ".namePrint($name)." ".$txt.""; } ?>[/PHP] මේ කෝඩ් එක run කරාම එන්නේ... [CODE]Rajitha Your username is tobaco[/CODE] කියලා.. ඒත් මට එන්න ඕන... [CODE]Rajitha Your username is Rajitha tobaco[/CODE] කියල... මේ කෙදි ප්රශ්නේ මචන්ලා. ඔය wrap() කියල function එක ඇතුලේ තියෙන namePrint($name) කියල කෑල්ල වැඩ කරන්නේ නැති එක.. error එකක් එන්නෙත් නෑ. මට ඕන මේ කෑල්ල කොහොම හරි වැඩ කරවගන්න.. ඒත් code structure එක වෙනස් වෙන්නත් බෑ.. මට functions හරහා.. variables වලට values assign කරන්න ඕන.. මේ වගේ..namePrint('Rajitha'); හා wrap('tobaco'); මේක කරගන්න විදිය කියල දෙන්න මචන්ලා ලෙකු උදව්වක්..:sorry::(:)[/COLOR][/SIZE] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom