how to programmatically alter the rendering of a field in Views
You can do that in the views interface, no need for pre- or post- processing on the theme level (as your script snippet suggests). 

I assume that you are using Drupal 7.x and Views 7.x-3.x. 

Go to the UI for the view you want to change:

http://example.com/admin/structure/views/view/yourviewname/edit
or Home » Administration » Structure » Views » Yourview


Make sure you are on the Display that you want to change (towards the top: Display has tabs "Page", "Add" and maybe others like "Block" or similar)

Under "Format", it shows "Format" and "Show". "Show" needs to be set to "Fields". 

The click on the field with your url, like:

 Content: URL (URL) 


A popup window will open with:

 Configure field: Content: URL


Click on "Rewrite Results" - a number of options open, check:

 Rewrite the output of this field 


A couple of additional fields now open up. 

Click on "Replacement patterns" and identify your url field, for example:

[field_url]


Now, enter the text you want to display into the "TEXT" field (can be html tags like an image tag):

An image tag
Some text


Check "Output this field as a link", and enter the replacement pattern into the "Link path " field [field_url]. 

If you want to use another field from your content type to show instead of something generic, that field needs to be on the "Fields" list BEFORE the field_url field, but can be marked as "invisible" if you don't want to display it otherwise.