Re: how do you make a string of binary numbers from an array
Carl Vondrick wrote:
Bint wrote:
> I have an array of numbers, and I need to turn it into a single
>binary string. How do I do that?
>
Sorry, but what you are trying to do?
>
You could do something like this:
>
$string = array(1,2,3,5,6 ,7);
$output = '';
foreach ($string as $ascii)
{
$output .= chr($ascii);
}
Is that ascii and not binary?
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
_______________ _______________ _______________ _______________ ______________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Re: how do you make a string of binary numbers from an array
Following on from IchBin's message. . .
>Carl Vondrick wrote:
>Bint wrote:
>> I have an array of numbers, and I need to turn it into a single
>>binary string. How do I do that?
>>
>Sorry, but what you are trying to do?
>>
>You could do something like this:
>>
>$string = array(1,2,3,5,6 ,7);
>$output = '';
>foreach ($string as $ascii)
>{
> $output .= chr($ascii);
>}
>
>Is that ascii and not binary?
>
The OP wants a binary string - That's a bit like asking for a cheese
steak.
Looks like the desperate OP should pay more attention in class and not
come here for their coursework. Better still - If that's the limit of
their intellectual engagement with programming they should think of an
alternative career ... such as say a turnip.
>Thanks in Advance...
>IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
>______________ _______________ _______________ _______________ ___
>____________
>
>'If there is one, Knowledge is the "Fountain of Youth"'
>-William E. Taylor, Regular Guy (1952-)
Comment