![]() |
PHP Question
I want to print a number string but I'm having trouble.
$Value = '1234'; $Print_Value = $Current_Version[0] . $Current_Version[1] . $Current_Version[2] . $Current_Version[3] ; echo ("$Print-Value"); I want it to print 1.2.3.4. I know that $ST=$STR.$STR1 combines strings but I can't figure how to get the desired output. |
Re: PHP Question
$a = 'bre';
$b = 'athe'; $out = $a.$b; // $out = breathe $out = $a . '.' . $b; // $out = bre.athe You need to also "dot" in the period. Even with that I still don't fully understand your question.. do you want to print the value in $Value, with periods between all the numbers, or are the digits in CurrentVersion? |
Re: PHP Question
rock on! Thanks!
|
Re: PHP Question
PHP Code:
just feedback if don't.. :) |
Re: PHP Question
Ok one more :)
Code:
$Print_Version = $Current_Version[0].'.'.$Current_Version[1].'.'.$Current_Version[2].'.'.$Current_Version[3]; It's sending out 1234 in red |
Re: PHP Question
Quote:
|
Re: PHP Question
Thanks for the idea, but, that didn't fix it. I Just copied it wrong. It's still printing 1234 instead of 1.2.3.4
|
Re: PHP Question
wouldn't this work?
Code:
echo "$val[1].$val[2].$val[3].$val[4]"; |
Re: PHP Question
If you'd like to get fancy:
PHP Code:
|
| All times are GMT -5. The time now is 16:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi