Link to home
Start Free TrialLog in
Avatar of keith1001
keith1001Flag for United States of America

asked on

PHP - decimal number to binary - array needed

I want to take a decimal number such at 53 which equals  110101.

I want to be able populate an array such as $data(0)=1,  $data(1)=0,  $data(2)=1, $data(3)=0, $data(4) =1,  etc


I did read up on the function decbin but kinda confused on putting the individual its into an array.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of keith1001

ASKER

Thank you, my brain was not functioning to good this morning.  Perfect!