title: Converting code with Anonymous functions to PHP 5.2
body: <p>I have some PHP 5.3 code which builds an array to be passed to a view. This is the code I have.</p>
  
  <pre><code># Select all this users links.
  $data = $this-&gt;link_model-&gt;select_user_id($this-&gt;user-&gt;id);
  if (count($data) &gt; 0) {
      # Process the data into the table format.
      $table = array
      (
          'properties' =&gt; array
          (
              'delete_link_column' =&gt; 0,
          ),
          'callbacks' =&gt; array
          (
              # Callback for the name link.
              function($value) {
                  return sprintf('&lt;a href="/links/view/name/%s"&gt;%s&lt;/a&gt;', $value, $value);
              },
              # Callback for the category link.
              function($value) {
                  return sprintf('&lt;a href="/category/view/name/%s"&gt;%s&lt;/a&gt;', $value, $value);
              },
              # Callback for the creation date.
              function($value) {
                  return date('jS M Y', $value);
              },
              # Callback for the delete link.
              function($value) {
                  return sprintf('&lt;a href="links/delete/name/%s"&gt;delete&lt;/a&gt;', $value);
              },
          ),
          'columns' =&gt; array
          (
              'name', 'category', 'creation date',
          ),
          'data' =&gt; array
          (
  
          ),
          'sorting' =&gt; array
          (
              'sort' =&gt; false,
          ),
      );
  </code></pre>
  
  <p>However the problem is that I cannot use anonymous functions in PHP 5.2, which is the server I must upload this schoolwork. The view requires callback functions to be defined so it can call them.</p>
  
  <p>What would be the neatest way to convert this PHP code to not using anonymous functions? Thanks.</p>