Function Php to Arduino!

hi, i have a problem with this function in php

$now = "32323232"
$bin = pack('N*', 0) . pack('N*', $now);

I should convert it (or find a way to do it with arduino)

Can someone help me? I couldn't find an implementation of the pack function

Thanks

What does the code do in PHP ?

Tripol3:
hi, i have a problem with this function in php

$now = "32323232"
$bin = pack('N*', 0) . pack('N*', $now);

I should convert it (or find a way to do it with arduino)

Can someone help me? I couldn't find an implementation of the pack function

Thanks

Create a struct of 2 unsigned longs. Store values in it.

struct someStruct {
  unsigned long value1;
  unsigned long value2;
  
};

void setup() {
  // put your setup code here, to run once:
  someStruct test;
  
  test.value1 = 1200;
  test.value2 = 121200;
}

void loop() {
  // put your main code here, to run repeatedly:

}

UKHeliBob:
What does the code do in PHP ?

The pack function requires to convert into data in a binary string

Tripol3:
The pack function requires to convert into data in a binary string

I think that we may have a language problem here as that makes no sense to me I am afraid. Perhaps if you provided some examples it would help. For instance, what is the result of the PHP code in your original post ?

$now = "32323232"
$bin = pack('N*', 0) . pack('N*', $now);

What does $bin contain after the code has run ?

Romonaga:
Create a struct of 2 unsigned longs. Store values in it.

struct someStruct {

unsigned long value1;
 unsigned long value2;
 
};

void setup() {
 // put your setup code here, to run once:
 someStruct test;
 
 test.value1 = 1200;
 test.value2 = 121200;
}

void loop() {
 // put your main code here, to run repeatedly:

}

I'm sorry, I didn't understand how you say you do. Could you help me? I just miss this function

UKHeliBob:
I think that we may have a language problem here as that makes no sense to me I am afraid. Perhaps if you provided some examples it would help. For instance, what is the result of the PHP code in your original post ?

$now = "32323232"

$bin = pack('N*', 0) . pack('N*', $now);



What does $bin contain after the code has run ?

Return a binary string.
The pack function does this PHP pack() Function