Hi... I have got a problem.
I try to return a integer array from C tp PHP but unable to get the values back..I am using SWIG to integrate C and PHP.
My .c looks like.
My .i looks like:
My php is:
?>
----------------------------------------------------------------
How to retrive the integer array in PHP?
Regards
Dheeraj Joshi
I try to return a integer array from C tp PHP but unable to get the values back..I am using SWIG to integrate C and PHP.
My .c looks like.
Code:
int arr[2];
int *arr_ret()
{
arr[0]=2;
arr[1]=4;
return arr;
}
Code:
%module example
%{
extern int arr[2];
%}
extern int arr[2];
My php is:
Code:
<?php
include("example.php");
$t = array(get_time());
print_r $t;
var_dump($t);
----------------------------------------------------------------
How to retrive the integer array in PHP?
Regards
Dheeraj Joshi
Comment