# How do i put two int to one float like INT1,INT2

Go to solution Solved by Barand,

## Recommended Posts

Title says it all...

I tried it this way:

```<?php
echo \$THROWOUT_PAYED_FULL;
#echo's 1.0
#goal is: 1.1
?>
```

Any suggestions ?

Edited by AzeS
##### Share on other sites

Try

`\$THROWOUT_PAYED_FULL = (float)(\$BUYEDFULL . '.' . \$BUYEDHALF);`
##### Share on other sites

echo's two.. doesnt work

##### Share on other sites

• Solution

As this is a math help forum

```\$x=1;
\$y=1;
\$z = \$x + \$y/10;
echo \$z;
```
##### Share on other sites

More generalized case

```\$x=1;
\$y=111;
\$z = \$x + \$y/pow(10,strlen(\$y));
```
##### Share on other sites

Solved  thanks alot !!

##### Share on other sites

```
<?php
for (\$i=0; \$i < \$BUYEDHALF; \$i++) {
if(\$i = 100 ) {
\$i = 0;
}
}
\$z = \$x + \$y/100;
echo "<br>".\$z;
?>```

##### Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.