PHP

php

Number Pair Additions In PHP

Sunday, April 17, 2011 - 00:33

I was helping my son out with his maths homework today and we came across a question that asked him to find some combinations of two numbers that added up to a given number (he is only 6 so this was good maths practice). This got me to thinking about how to calculate all possible ways in which two numbers could be added together to make another number.

Category: 

Automatically Copying The Node Title To The Menu Title In Drupal 6

Wednesday, April 13, 2011 - 17:48

One new feature of Drupal 7 is that any title you give a node will be copied to the menu title field when you create a menu item. I wanted to replicate this functionality in Drupal 6 and so I created a function that did just that. I have used this function a few times in different projects so I'm posting it here.

Category: