Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
Last active February 17, 2021 03:41
Show Gist options
  • Select an option

  • Save frankyonnetti/5944772 to your computer and use it in GitHub Desktop.

Select an option

Save frankyonnetti/5944772 to your computer and use it in GitHub Desktop.
Drupal 7 - replace spaces with dashes #drupal #d7 #php
<?php
$match=strtolower($node->title); print $node_field[0]['value'] = str_replace(' ', '-', $match);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment