Title: Function called does not use default value
Last modified: August 22, 2016

---

# Function called does not use default value

 *  [losgaz](https://wordpress.org/support/users/losgaz/)
 * (@losgaz)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/function-called-does-not-use-default-value/)
 * My plugin has a function which is will display a listing. It is intended to be
   called from various pages with a parameter. I have set a default value but this
   does not get passed to the function code.
    example code is `function los_mem_test(
   $a=1) { echo “a is[” .$a .”]<br />”; }`
 * this returns _a is[]_.
 * Any ideas please? I’m sure it must be something basic, which I can’t see.
 * Thanks

The topic ‘Function called does not use default value’ is closed to new replies.

## Tags

 * [default](https://wordpress.org/support/topic-tag/default/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * 0 replies
 * 1 participant
 * Last reply from: [losgaz](https://wordpress.org/support/users/losgaz/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/function-called-does-not-use-default-value/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
