Question: I realize that "eval" largely fills the role of the C++ #define feature, but how would I do something like this in PHP:

```
#define D(x,y) if (N==x) return(y); else {
void Sample(int N) {
  D(3)
    D(4)
      D(22)
    }
  }
}

```

My problem is that eval("return;") will just return from eval, not from the calling routine. My other problem is parameterizing the macro.

Answer: 
This should work to select all:

```
$('a').each(function() { $(this).text(); /* do something with it */ });

```

if you want to get the click event on anchor tags, but only those without an id or class, try this:

```
$('a').not('a[id]').not('a[class]').click(function() { $(this).text(); ... });

```

and if you only want your action to be performed once:

```
$('a').not('a[id]').not('a[class]').one("click", function() { $(this).text(); ... });

```
If the links are actually built dynamically once the page is already served to the client then you will want to wrap your `<a>` tags with an identifying element and then add an event listener to the wrapping element.

If you want this behavior for all the links on the page, then just use:

```
$('a').click(
   function() { 
      var link_text = $(this).text();
      //Do something with link_text 
   });

```