In php how do I convert a string "1010101010" into the integer value represented by this binary number?
eg "10" would go to 2, "101" would go to 5
Use bindec() function to convert from binary to decimal:
$value = bindec("10101011010101");
                        Try the bindec() function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With