There's no way you can make a php function work without posting the data to the server.
Think about it: php is a server software and runs on the server - once the page is loaded, php has done its bit and has no longer control over your page. Actually, since the http is a stateless protocol, even the connection to the server is severed.
So, when the PRE-processor 😉 is done with the page, it may have executed a lot of php, and the page is perhaps filled with php-values, but it is done and over with.
One workaround around this may be to fetch all the values to be manipulated out of db by php, then loading them into a Javascript by php, leaving them accessible to further manipulation by the client-side.
Another is to auto-execute remote php scripts from flash, but the pain quickly equals the gain in that respect 😃
knutm