using a value retrieved by jQuery in calling a php function
<p>Through use of jQuery I arrive at a number (id of a specific widget on my page).
The variable that holds this number is <code>active_widget_id</code>.</p>

<p>What I need to do is:</p>

<ul>
<li>make use of this number as in the following:</li>
</ul>

<p><code>&lt;?php $toggleImage = $text_widgets[active_widget_id]['toggle']; ?&gt;</code></p>

<ul>
<li><p>get the resulting $toggleImage value (it is the name of a file, like
'big-widget-header.gif')</p></li>
<li><p>And display the image in a div (say #toggleHolder) on the page.</p></li>
</ul>

<p>The trouble is with a) the jQuery needing to run at document.ready to get the number, b) and once I am able to construct "$text_widgets[active_widget_id]['toggle'];", not being able to run the php code (wrapping it with php echo tags doesn't work, it just lists the above, not its result.)</p>

<p>I am more of a designer and I am trying to go with appends, prepends, html() and such but I suspect I should look at an ajax type of solution.</p>

<p>Any pointers appreciated...</p>
